
SHELL = /bin/bash 

CC    	= gcc
CXX     = g++
AR    	= ar
RANLIB 	= ranlib
ifdef PLATFORM # aarch64-mix210-linux(ss928/ss927)、arm-himix200-linux(av300)
CC    	= $(PLATFORM)-gcc
CXX    	= $(PLATFORM)-g++
AR     	= $(PLATFORM)-ar
RANLIB 	= $(PLATFORM)-ranlib
endif

export CC CXX AR RANLIB

3.100-1:
	# export CC CXX AR RANLIB && \
	cd 3.100 && rm -rf .build 1-install-1-$(PLATFORM) && mkdir -p .build 1-install-1-$(PLATFORM) && cd .build && \
	../configure --prefix=`pwd`/../1-install-1-$(PLATFORM) \
	$(if $(PLATFORM), --host=$(shell $(CC) -dumpmachine)) && \
	make -j4 && make install
# 默认编译方案 💚
  # 如果交叉编译报错：quantize.c:(.text+0x21b): undefined reference to `init_xrpow_core_sse' 那就把 export CC CXX AR RANLIB 放到最外层
  # 其它选项：
    # --srcdir=`pwd`/../  # 为了执行../configure，发现这个不加也没事
#
